#pragma once
#include "RandomDie.h"
#include <stdio.h>
#include <conio.h>

#define NUM_PLAYERS 2
#define INVENTORY_X 58
#define INVENTORY_Y 0

#define G_PLAYING 1
#define G_TRADING 2

// Forward declarations
class Player;
class PropertyList;
class Deck;
class Board;
class ConsoleBox;
class Space;
class Card;

class Game
{
private:
	Deck* communityDeck;
	Deck* chanceDeck;
	Board* board;
	RandomDie* dice[2];
	int offsX, offsY;
	short curPlayer;
	bool waiting; // Waiting for players to finish moving (Can't roll the dice)
	int m_gameState;
public:
	PropertyList* properties;
	Player* players;
	ConsoleBox* cBox;

	void Init();

	int getState(){ return m_gameState; }
	void setState(int a_gameState){ m_gameState = a_gameState; }
	void Update();

	void MoveCamera();

	void Input(int a_input);
	void Draw();

	void Quit();

	void NextPlayer();

	int searchSpace(char* a_search, int a_start);

	bool isWaiting() { return waiting; }

	void setWaiting(bool a_waiting) { waiting = a_waiting; }

	bool getWaiting() { return waiting; }

	Space* getSpace(int a_space);

	int getCurPlayer() { return curPlayer; }
	
	void DrawMoney();

	Card* pickupChanceCard();

	Card* pickupCommunityChestCard();

	void MoveCamUp(int a_move);
	void MoveCamDown(int a_move);
	void MoveCamLeft(int a_move);
	void MoveCamRight(int a_move);
		
};